Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Transfer excess back and reset allowance #28

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

miguelmtzinf
Copy link
Contributor

This PR applies two significant changes to the debt swap action:

  • Resets the allowance from the adapter contract to the Augustus contract after Paraswap execution. This ensures no pending allowance is left.
  • Transfers excess of assets after the swap to the user. This ensures that in case the buy is not completely "exact out", the excess will be transferred to the user rather than remaining within the contract.

This introduces similar changes to aave-dao/aave-v3-origin#49

@miguelmtzinf
Copy link
Contributor Author

Commit c53ea9f implements significant modifications due to the allowances configuration from the adapter to the Aave pool. We can opt to discard these changes to keep modifications minimal and proceed under the assumption that interactions with Aave are secure.

@sakulstra sakulstra merged commit 45a8a9f into bgd-labs:main Sep 17, 2024
1 check failed
@miguelmtzinf miguelmtzinf deleted the fix/paraswap-excess branch September 17, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants